﻿<UserControl x:Class="Schedulr.Plugins.AddBorderToPicture.AddBorderToPicturePluginSettingsControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="400">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Label Grid.Row="0" Grid.Column="0" Content="Color" VerticalAlignment="Center" />
        <Grid Grid.Row="0" Grid.Column="1" Margin="5,0,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <TextBox Grid.Column="0" Text="{Binding Path=BorderColor}" />
            <Rectangle Grid.Column="1" x:Name="borderColorPreviewRectangle" Stroke="Black" Width="25" Margin="5,0,0,0" ToolTip="Preview" />
            <Button Grid.Column="2"  Content="..." x:Name="borderColorButton" Click="borderColorButton_Click" Margin="5,0,0,0" Style="{DynamicResource MediumButton}" />
        </Grid>

        <Label Grid.Row="1" Grid.Column="0" Content="Margin" Margin="0,5,0,0" VerticalAlignment="Center" />
        <WrapPanel Grid.Row="1" Grid.Column="1" Margin="5,5,0,0">
            <StackPanel Orientation="Horizontal">
                <Label Content="Left" VerticalAlignment="Center" Margin="0,0,5,0" />
                <TextBox Text="{Binding Path=BorderMarginLeft}" MinWidth="40" Margin="0,0,5,0" />
            </StackPanel>

            <StackPanel Orientation="Horizontal">
                <Label Content="Top" VerticalAlignment="Center" Margin="0,0,5,0" />
                <TextBox Text="{Binding Path=BorderMarginTop}" MinWidth="40" Margin="0,0,5,0" />
            </StackPanel>

            <StackPanel Orientation="Horizontal">
                <Label Content="Right" VerticalAlignment="Center" Margin="0,0,5,0" />
                <TextBox Text="{Binding Path=BorderMarginRight}" MinWidth="40" Margin="0,0,5,0" />
            </StackPanel>

            <StackPanel Orientation="Horizontal">
                <Label Content="Bottom" VerticalAlignment="Center" Margin="0,0,5,0" />
                <TextBox Text="{Binding Path=BorderMarginBottom}" MinWidth="40" Margin="0,0,5,0" />
            </StackPanel>
        </WrapPanel>
    </Grid>
</UserControl>